﻿/*----------------------------------------------------------------
//文件功能描述：商品分页查询对象。
//创建人：赵国伟
//创建时间：2012-04-08 13:49:54
//----------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Shopping.Common;

namespace Shopping.Model
{
    public class QueryGoodsAsPage : AsPage
    {
        /// <summary>
        /// 关键字
        /// </summary>
        public string KeyWords;

        /// <summary>
        /// 一级分类编号；
        /// </summary>
        public int FCategoryID;

        /// <summary>
        /// 二级分类编号；
        /// </summary>
        public int SCategoryID;

        /// <summary>
        /// 三级分类编号；
        /// </summary>
        public int TCategoryID;

        /// <summary>
        /// 品牌ID;
        /// </summary>
        public int BrandID;

        /// <summary>
        /// 商品产地ID；
        /// </summary>
        public int GoodsPlaceID;

        /// <summary>
        /// 商品所属专区
        /// </summary>
        public int SpecialAreaID;

        /// <summary>
        /// 商品包装ID;
        /// </summary>
        public int PackUnitID;

        /// <summary>
        /// 按价格查询的条件；
        /// </summary>
        public int GoodsPriceCondID;

        /// <summary>
        /// 商品销售状态；
        /// </summary>
        public string SaleStatus;


        /// <summary>
        /// 商品推荐类别编号；
        /// </summary>
        public int CommendCategoryID;


        /// <summary>
        /// 商品状态；
        /// </summary>
        public string Status;

        /// <summary>
        /// 排序值；
        /// </summary>
        public int Sorts;


        public QueryGoodsAsPage Clone()
        {
            QueryGoodsAsPage q = new QueryGoodsAsPage(false);
            q.KeyWords = this.KeyWords;
            q.FCategoryID = this.FCategoryID;
            q.SCategoryID = this.SCategoryID;
            q.TCategoryID = this.TCategoryID;
            q.GoodsPlaceID = this.GoodsPlaceID;
            q.SpecialAreaID = this.SpecialAreaID;
            q.BrandID = this.BrandID;
            q.PackUnitID = this.PackUnitID;
            q.GoodsPriceCondID = this.GoodsPriceCondID;
            q.SaleStatus = this.SaleStatus;
            q.Status = this.Status;
            q.Sorts = this.Sorts;

            return q;
        }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="IsAutoLoadParams">是否自动加载查询参数</param>
        public QueryGoodsAsPage(bool IsAutoLoadParams)
        {
            if (!IsAutoLoadParams)
                return;
            KeyWords = Utility.G("KeyWords");
            FCategoryID = Utility.G<int>("FCategoryID");
            SCategoryID = Utility.G<int>("SCategoryID");
            TCategoryID = Utility.G<int>("TCategoryID");
            GoodsPlaceID = Utility.G<int>("GoodsPlaceID");
            SpecialAreaID = Utility.G<int>("SpecialAreaID");
            BrandID = Utility.G<int>("BrandID");
            PackUnitID = Utility.G<int>("PackUnitID");
            GoodsPriceCondID = Utility.G<int>("GoodsPriceCondID");
            SaleStatus = Utility.G("SaleStatus");
            Status = Utility.G("Status");
            Sorts = Utility.G<int>("Sorts");
            CommendCategoryID = Utility.G<int>("CommendCategoryID");
            base.CurPage = Utility.G<int>("CurPage");
            if (base.CurPage <= 0) base.CurPage = 1;

        }


    }
}
